﻿<%--
///////////////////////////////////////////////////////////////////////////
/// File: <FileName>
/// Description: 
///    <Description>
/// Copyright© <DateTime.Now.Year> <Copyright>
/// History:
///     <DateTime.Now>    My.GenCode    Original Version
///////////////////////////////////////////////////////////////////////////
--%>
<%@Page Language="C#" Inherits="<NameSpace>.Web.BasePage" AutoEventWireup="false" %>
<%@import namespace="System" %>
<%@import namespace="System.Collections.Generic" %>
<%@import namespace="<<NameSpace>>.Domain.Entities" %>
<%@import namespace="<<NameSpace>>.Domain.Interfaces" %>
<%@import namespace="<<NameSpace>>.Business.Security" %>
<%@import namespace="<<NameSpace>>.Web.Controllers" %>
<script runat="server">
</script>
<%if (this.IsMaintainMode){%>
    <form id="Frm<<CreateMethodName>>" method="post" action="<%=this.RootUrl %>/Ajax.aspx?op=<<CreateMethodName>>">

    <h1 class="showHiddenForm hd">添加<<EntityName>></h1>
    <h1 class="hideHiddenForm hd" style="display:none">添加文章()</h1>
    <div class="hiddenForm bd">
        <input type="hidden" name="SercurityId" value="<%=SecurityUtility.UserId %>" />
        <ul>[loop<<CodeBlock>>]
            <li>
                <label><Name>:</label><input type="text" name="<Name>" />
            </li>[/loop<<CodeBlock>>]
            <li>
                <label>&nbsp;</label><button>提交</button>
            </li>
        </ul>
    </div>
    </form>
<%}%>

    
<script type="text/javascript">

$(function(){
    
    var frm = $("#Frm<<CreateMethodName>>");
    
    // 绑定表单提交事件
    frm.ajaxSubmit( function(dat){
        $('body').alert(dat.success||dat.failure||"");
        if( dat.success ){
            // Do Something Here
        }        
    });
});

</script>
